function checkAjaxResult(result){
	
	if(result == null){alert("查詢失敗！");return false;}
	if(!result['sl'] == "1"){alert("該帳號已在其他裝置登入，系統將登出!");logout();}
	if(result['di'] == "1"){alert(result['msg']);return true;}
	
	return true;
}

function logout(){
	$.post(
		config.logoutPath,{},
		function(result) {
			location.href="login.php";
		}
	); 
}